import request from '@/axios'
import type { LoginFormType, LoginAuthorization, Menu } from './types'

export const login = (data: LoginFormType) => {
    return request.post<LoginAuthorization>({
        url: '/login',
        data
    })
}

export const getMenus = (): Promise<Menu[]> => {
    return request.get({
        url: '/api/menu/navigation'
    })
}
